class Solution:
    def climbStairs(self, n: int) -> int:
        d = {0: 0, 
             1: 1,
             2: 2,}

        if n in d.keys():
            return d[n]
        else:
            for i in range(3, n+1, 1):
                d[i] = d[i-2] + d[i-1]

        return d[n]